package cn.xopencode.securityservice.convert.violate;


import cn.xopencode.common.framework.vo.PageResult;
import cn.xopencode.securityservice.dal.mysql.dataobject.activity.ActivityDO;
import cn.xopencode.securityservice.dal.mysql.dataobject.violate.ViolateDO;
import cn.xopencode.securityservice.rpc.activity.dto.ActivityCreateReqDTO;
import cn.xopencode.securityservice.rpc.activity.dto.ActivityRespDTO;
import cn.xopencode.securityservice.rpc.violate.dto.ViolateAuditReqDTO;
import cn.xopencode.securityservice.rpc.violate.dto.ViolateCreateReqDTO;
import cn.xopencode.securityservice.rpc.violate.dto.ViolateRespDTO;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.factory.Mappers;

@Mapper
public interface ViolateConvert {

    ViolateConvert INSTANCE = Mappers.getMapper(ViolateConvert.class);
    ViolateDO convert(ViolateCreateReqDTO bean);
    ViolateDO convert(ViolateAuditReqDTO bean);
    ViolateRespDTO convert(ViolateDO bean);
    @Mapping(source = "records", target = "list")
    PageResult<ViolateRespDTO> convertPage(IPage<ViolateDO> page);

}

